class Date {
    public int year;
    public int month;
    public int day;


    public Date() {
        this(1111,22,33);
        System.out.println("没有参数的构造方法");

    }
    public Date(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
        System.out.println("有三个参数的构造方法");
    }

    public void printDate() {
        System.out.println(this.year + "/" + this.month + "/" + this.day);
    }
}
public class Test3 {
    public static void main(String[] args) {
        int year=10;
        // 构造三个日期类型的对象 d1 d2 d3
        Date d1 = new Date();
        Date d2 = new Date(2020,2,5);

        d1.printDate();
        d2.printDate();

    }
}
